<!DOCTYPE html>
<html lang="en">
  <head>
    <title>SwipeTableViewCell Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/SwipeTableViewCell" class="dashAnchor"></a>
    <a title="SwipeTableViewCell Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">SwipeCellKit Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/SwipeCellKit/SwipeCellKit"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">SwipeCellKit Reference</a>
        <img id="carat" src="../img/carat.png" />
        SwipeTableViewCell Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Guides.html">Guides</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../advanced.html">Advanced</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/SwipeAction.html">SwipeAction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SwipeCollectionViewCell.html">SwipeCollectionViewCell</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SwipeTableViewCell.html">SwipeTableViewCell</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/ExpansionFulfillmentStyle.html">ExpansionFulfillmentStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SwipeActionStyle.html">SwipeActionStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SwipeActionsOrientation.html">SwipeActionsOrientation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SwipeTransitionStyle.html">SwipeTransitionStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SwipeVerticalAlignment.html">SwipeVerticalAlignment</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/SwipeActionTransitioning.html">SwipeActionTransitioning</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SwipeCollectionViewCellDelegate.html">SwipeCollectionViewCellDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SwipeExpanding.html">SwipeExpanding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/ScaleAndAlphaExpansion.html">ScaleAndAlphaExpansion</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ScaleTransition.html">ScaleTransition</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeActionTransitioningContext.html">SwipeActionTransitioningContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionAnimationTimingParameters.html">SwipeExpansionAnimationTimingParameters</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionStyle.html">SwipeExpansionStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionStyle/Target.html">– Target</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionStyle/Trigger.html">– Trigger</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionStyle/CompletionAnimation.html">– CompletionAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeExpansionStyle/FillOptions.html">– FillOptions</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SwipeOptions.html">SwipeOptions</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>SwipeTableViewCell</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SwipeTableViewCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>

                </div>
              </div>
            <p>The <code>SwipeTableViewCell</code> class extends <code>UITableViewCell</code> and provides more flexible options for cell swiping behavior.</p>

<p>The default behavior closely matches the stock Mail.app. If you want to customize the transition style (ie. how the action buttons are exposed), or the expansion style (the behavior when the row is swiped passes a defined threshold), you can return the appropriately configured <code><a href="../Structs/SwipeOptions.html">SwipeOptions</a></code> via the <code><a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a></code> delegate.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:12SwipeCellKit0a9TableViewB0C8delegateAA0adeB8Delegate_pSgXwvp"></a>
                    <a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
                    <a class="token" href="#/s:12SwipeCellKit0a9TableViewB0C8delegateAA0adeB8Delegate_pSgXwvp">delegate</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The object that acts as the delegate of the <code>SwipeTableViewCell</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:12SwipeCellKit0a9TableViewB0C11swipeOffset12CoreGraphics7CGFloatVvp"></a>
                    <a name="//apple_ref/swift/Property/swipeOffset" class="dashAnchor"></a>
                    <a class="token" href="#/s:12SwipeCellKit0a9TableViewB0C11swipeOffset12CoreGraphics7CGFloatVvp">swipeOffset</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The point at which the origin of the cell is offset from the non-swiped origin.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">swipeOffset</span><span class="p">:</span> <span class="kt">CGFloat</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:12SwipeCellKit0a9TableViewB0C04hideA0ySb8animated_ySbcSg10completiontF"></a>
                    <a name="//apple_ref/swift/Method/hideSwipe(animated:completion:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:12SwipeCellKit0a9TableViewB0C04hideA0ySb8animated_ySbcSg10completiontF">hideSwipe(animated:completion:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Hides the swipe actions and returns the cell to center.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">hideSwipe</span><span class="p">(</span><span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>animated</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Specify <code>true</code> to animate the hiding of the swipe actions or <code>false</code> to hide it immediately.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completion</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The closure to be executed once the animation has finished. A <code>Boolean</code> argument indicates whether or not the animations actually finished before the completion handler was called.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:12SwipeCellKit0a9TableViewB0C04showA0yAA0A18ActionsOrientationO11orientation_Sb8animatedySbcSg10completiontF"></a>
                    <a name="//apple_ref/swift/Method/showSwipe(orientation:animated:completion:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:12SwipeCellKit0a9TableViewB0C04showA0yAA0A18ActionsOrientationO11orientation_Sb8animatedySbcSg10completiontF">showSwipe(orientation:animated:completion:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Shows the swipe actions for the specified orientation.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">showSwipe</span><span class="p">(</span><span class="nv">orientation</span><span class="p">:</span> <span class="kt"><a href="../Enums/SwipeActionsOrientation.html">SwipeActionsOrientation</a></span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>orientation</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The side of the cell on which to show the swipe actions.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>animated</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Specify <code>true</code> to animate the showing of the swipe actions or <code>false</code> to show them immediately.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completion</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The closure to be executed once the animation has finished. A <code>Boolean</code> argument indicates whether or not the animations actually finished before the completion handler was called.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:12SwipeCellKit0a9TableViewB0C03setA6Offsety12CoreGraphics7CGFloatV_Sb8animatedySbcSg10completiontF"></a>
                    <a name="//apple_ref/swift/Method/setSwipeOffset(_:animated:completion:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:12SwipeCellKit0a9TableViewB0C03setA6Offsety12CoreGraphics7CGFloatV_Sb8animatedySbcSg10completiontF">setSwipeOffset(_:animated:completion:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The point at which the origin of the cell is offset from the non-swiped origin.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setSwipeOffset</span><span class="p">(</span><span class="n">_</span> <span class="nv">offset</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2018 <a class="link" href="https://twitter.com/mkurabi" target="_blank" rel="external">Mohammad Kurabi</a>. All rights reserved. (Last updated: 2018-05-26)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
